package main

import (
	"fmt"
	"log"
	"net/http"
)

/*
*
自定义多路复用器
*/
func main() {
	mux := http.NewServeMux()
	mux.HandleFunc("/", hi)

	server := &http.Server{
		Addr:    ":8081",
		Handler: mux,
	}

	if err := server.ListenAndServe(); err != nil {
		log.Fatal(err)
	}

}

func hi(writer http.ResponseWriter, request *http.Request) {
	fmt.Fprintf(writer, "hi,web")
}
